import rxAjax from '@/assets/js/ajax.js';

//git连接器管理 api接口
export const SysGitManageApi = {};

SysGitManageApi.baseUrl= '/api-system/system/core/sysGitManage';

//查询列表
SysGitManageApi.query=function (parameter) {
  var url= SysGitManageApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
SysGitManageApi.get =function(pkId) {
  var url= SysGitManageApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

SysGitManageApi.getByAppId =function(appId) {
  var url= SysGitManageApi.baseUrl + '/getByAppId?appId=' + appId;
  return rxAjax.get(url);
}

//保存数据
SysGitManageApi.save =function(parameter) {
  var url= SysGitManageApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
SysGitManageApi.del =function(parameter) {
  var url= SysGitManageApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default SysGitManageApi;

